package cc.linker.steplink.crm.service;

import cc.linker.steplink.crm.domain.BindUserDto;
import cc.linker.steplink.crm.domain.WxOrgInfo;
import cc.linker.steplink.crm.response.GlobalException;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Map;

public interface ICustomerBindService {
    /**
     * 加入文章分享
     * @param openid
     */
    void joinArticleShare(BindUserDto bindUser,String customerId) throws GlobalException;

    /**
     * 绑定了员工账号成为内部员工
     * @param bindUser
     */
    void bindCustomerToStaff(BindUserDto bindUser,String customerId) throws GlobalException;

    /**
     * 取消绑定
     * @param bindUserDto
     */
    void unbindCustomer(BindUserDto bindUserDto,String customerId) throws GlobalException;

    /**
     * 检查绑定
     * @param bindUserDto
     * @return
     * @throws GlobalException
     */
    boolean checkCustomerBind(BindUserDto bindUserDto,String customerId) throws GlobalException;

    /**
     * 获取绑定的机构信息
     * @return
     * @param bindUserDto
     */
    WxOrgInfo getOrgInfo(BindUserDto bindUserDto) throws IOException, URISyntaxException;

    /**
     * 获取绑定的机构信息
     * @return
     * @param bindUserDto
     */
    WxOrgInfo getOrgInfo(BindUserDto bindUserDto, boolean justOrgcode) throws IOException, URISyntaxException;

    /**
     * 获取绑定用户usercode
     * @return
     * @param bindUserDto
     */
    String getUsercode(BindUserDto bindUserDto);

    Map getOpenIdAndToken(String customerId);
}
